<template>
<div class="info">
    <div class="headName">示例介绍</div>
    <div class="main_content">
       <div class="main_content_box">
            <div class="content_box">
                <!-- 对话 -->
                <div class="he">
                    <img src="dist/images/1.jpg" />
                    <div>
                        <p>示例介绍</p>
                        <div>
                            <span>摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅</span>
                            <img src="src/renderer/assets/image/bubble-left.png" />
                        </div>
                    </div>
                    <span>2018/06/05 10:51</span>
                </div>
                <div class="me">
                    <span>2018/06/05 10:51</span>
                    <div>
                        <p>我</p>
                        <div>
                            <span>吃杨梅啊吃杨梅</span>
                            <img src="src/renderer/assets/image/bubble-right.png" />
                        </div>
                    </div>
                    <img src="dist/images/2.jpg" />
                </div>
                <div class="he">
                    <img src="dist/images/1.jpg" />
                    <div>
                        <p>示例介绍</p>
                        <div>
                            <span>摘杨梅啊摘杨梅</span>
                            <img src="src/renderer/assets/image/bubble-left.png" />
                        </div>
                    </div>
                    <span>2018/06/05 10:51</span>
                </div>
                <div class="he">
                    <img src="dist/images/1.jpg" />
                    <div>
                        <p>示例介绍</p>
                        <div>
                            <span>摘杨梅啊摘杨梅</span>
                            <img src="src/renderer/assets/image/bubble-left.png" />
                        </div>
                    </div>
                    <span>2018/06/05 10:51</span>
                </div>
                <div class="me">
                    <span>2018/06/05 10:51</span>
                    <div>
                        <p>我</p>
                        <div>
                            <span>吃杨梅啊吃杨梅</span>
                            <img src="src/renderer/assets/image/bubble-right.png" />
                        </div>
                    </div>
                    <img src="dist/images/2.jpg" />
                </div>
                <div class="me">
                    <span>2018/06/05 10:51</span>
                    <div>
                        <p>我</p>
                        <div>
                            <span>吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅</span>
                            <img src="src/renderer/assets/image/bubble-right.png" />
                        </div>
                    </div>
                    <img src="dist/images/2.jpg" />
                </div>
                <div class="me">
                    <span>2018/06/05 10:51</span>
                    <div>
                        <p>我</p>
                        <div>
                            <span>吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅吃杨梅啊吃杨梅</span>
                            <img src="src/renderer/assets/image/bubble-right.png" />
                        </div>
                    </div>
                    <img src="dist/images/2.jpg" />
                </div>
                <div class="he">
                    <img src="dist/images/1.jpg" />
                    <div>
                        <p>示例介绍</p>
                        <div>
                            <span>摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅</span>
                            <img src="src/renderer/assets/image/bubble-left.png" />
                        </div>
                    </div>
                    <span>2018/06/05 10:51</span>
                </div>
                <div class="he">
                    <img src="dist/images/1.jpg" />
                    <div>
                        <p>示例介绍</p>
                        <div>
                            <span>摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅摘杨梅啊摘杨梅</span>
                            <img src="src/renderer/assets/image/bubble-left.png" />
                        </div>
                    </div>
                    <span>2018/06/05 10:51</span>
                </div>
            </div>
       </div>
    </div>
    <div class="main_footer" :class="{ main_footer_on : isFoucs }">
        <div class="footer_gn">
            <div>
                <img class="face" src="src/renderer/assets/image/face.png" />
                <img class="file" src="src/renderer/assets/image/file.png" />
            </div>
        </div>
        <div class="send_content">
            <textarea class="send_content_text" :class="{ main_footer_on : isFoucs }" v-model="sendContent" @focus="handFoucs()" @blur="handBlur()"></textarea>
        </div>
        <div class="send_out">
            <div @click="sendOut">发送(S)</div>
        </div>
    </div>
</div>
</template>
<script>
    export default {
        data () {
            return {
                content: '',
                sendContent:'', //输入框的内容
                isFoucs:false
            };
        },
        methods: {
            onKeyup (e) {
                if (e.ctrlKey && e.keyCode === 13 && this.content.length) {
                  console.log(this.content)
                }
            },
            //点击发送
            sendOut(){
               var sendContent = this.sendContent 
               console.log(sendContent)
            },
            //获的焦点
            handFoucs(){
                this.isFoucs = true
            },
            //失去焦点
            handBlur(){
                this.isFoucs = false
            }
        }
    };
</script>
<style lang="scss" scoped>
.info {
    display: block;
    width: 100%;
    height: 100%;
    border-top: solid 1px #ddd;
}
.headName{
    width: 100%;
    height: 60px;
    line-height: 60px;
    padding-left: 30px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}
.main_content{
    width: 100%;
    height: calc(100% - (240px));
    height:-moz-calc(100% - (240px));
	height:-webkit-calc(100% - (240px));
    min-height: 350px;
    background: #f5f5f5;
    overflow: hidden;
    padding: 0px 0px 0px 30px; 
}
.main_content_box{
    width: 100%;
    height: 100%;
    overflow: auto;
}
.content_box{
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 5px;
    padding-right: 28px;
}
.content_box>div{
    width: 100%;
    margin-bottom: 17px;
}
.main_content_box::-webkit-scrollbar {/*滚动条整体样式*/
    width: 6px;     /*高宽分别对应横竖滚动条的尺寸*/
    height: 1px;
}
.main_content_box::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
    border-radius: 10px;
    background: #ddd;
}
.main_content_box::-webkit-scrollbar-track {/*滚动条里面轨道*/
    border-radius: 10px;
    background: #f5f5f5;
}
.he{
    display: flex;
    flex-direction: row;
}
.he>img{
    width: 34px;
    height: 34px;
    border-radius: 2px;
    vertical-align: middle;
    margin-right: 12px;
}
.he>div{
    max-width: 65%;
    color: #333;
    font-size: 14px;
}
.he>div>div{
    width: 100%;
    background: #fff;
    color: #333;
    font-size: 14px;
    border-radius: 2px;
    padding: 5px 9px;
    line-height: 20px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.1);
}
.he>div>div>img{
       position: absolute;
    width: 9px;
    height: auto;
    top: 3px;
    left: -8px;
}
.he>div>p{
    margin: 0px 0px 1px 5px;
     color: #999;
    font-size: 12px;
}
.he>span{
    color: #666;
    font-size: 12px;
    padding-left: 10px;
    padding-top: 23px;
}
.me{
    display: flex;
    flex-direction: row;
    min-height: 34px;
    justify-content: flex-end;
}
.me>img{
    width: 34px;
    height: 34px;
    border-radius: 2px;
    vertical-align: middle;
    margin-left: 12px;
}
.me>div{
    max-width:65%;
    color: #333;
    font-size: 14px;
}
.me>div>div{
    position: relative;
    width: 100%;
    background: #9eea6a;
    color: #333;
    font-size: 14px;
    border-radius: 2px;
    padding: 5px 9px;
    line-height: 20px;
}
.me>div>div>img{
    position: absolute;
    width: 20px;
    height: auto;
    top: 0px;
    right: -10px;
}
.me>div>p{
    color: #999;
    margin: 0px 5px 1px 0px;
    text-align: right;
    font-size: 12px;
}

.me>span{
    color: #666;
    font-size: 12px;
    padding-top: 23px;
    padding-right: 10px;
}



.main_footer{
    width: 100%;
    height: 180px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    padding: 12px 22px 8px 22px;
}
.footer_gn{
    width: 100%;
    height: 22px;
    margin-bottom: 4px;
    display: flex;
    flex-direction: row;
}
.footer_gn>div>.face{
    width: 22px;
    height: 22px;
    cursor: pointer;
    margin-right: 12px;
}
.footer_gn>div>.file{
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 12px;
}
.send_content{
    width: 100%;
    height: 103px;
}
.send_content_text{
    width: 100%;
    height: 96px;
    resize: none;
    border: none;
    outline: none;
    background: #f5f5f5;
    font-size: 14px;
    color: #333;
    line-height: 20px;
    font-family: "微软雅黑";
}
.send_content>textarea::-webkit-scrollbar {/*滚动条整体样式*/
    width: 6px;     /*高宽分别对应横竖滚动条的尺寸*/
    height: 1px;
}
.send_content>textarea::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
    border-radius: 10px;
    background: #ddd;
}
.send_content>textarea::-webkit-scrollbar-track {/*滚动条里面轨道*/
    border-radius: 10px;
    background: #f5f5f5;
}

.send_out{
    width: 100%;
    height: 26px;
    text-align: right;
    margin-top: 4px;
}
.send_out>div{
    cursor: pointer;
    display: inline-block;
    width: 66px;
    height: 26px;
    border: 1px solid #ddd;
    text-align: center;
    line-height: 26px;
    font-size: 12px;
    color: #333;
}
.main_footer_on{
    background: #fff;
}
</style>